<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>转换大小写</title>
		<script>
		function upper(){
		var b=document.getElementById("data").value;
		document.getElementById("newData").value=b.toUpperCase();
		}
		function lower(){
		var s=document.getElementById("data").value;
		document.getElementById("newData").value=s.toLowerCase();
		}
		</script>
	</head>
	<body>
	<font size="7px">字符串大小写转换</font><br /><br />
		原数据:<input type="text" id="data"/><br /><br />
		操作:<input type="button" value="转大写" onclick="upper()" />&nbsp;&nbsp;
		<input type="button" value="转小写" onclick="lower()" /><br /><br />
		新数据：<input type="text" readonly="readonly" id="newData"/>
	</body>
</html>
